package _99练习;
public class Baozi2 implements Runnable{
	
	int count = 100;
	
	@Override
	public void run() {
		
			
			while(count>0)
			{
				synchronized(this)
			{
				count--;
				System.out.println(Thread.currentThread().getName() + "吃完一个包子了，还剩:"+count);
			}	
				try {
					Thread.sleep(50);
				} catch (InterruptedException e) {
					
					e.printStackTrace();
				}
			}

		
	}

}